package com.designmodel.designmodel.OBERRVER_Pattern_观察者模式;

import com.designmodel.designmodel.OBERRVER_Pattern_观察者模式.service.impl.Progress;
import com.designmodel.designmodel.OBERRVER_Pattern_观察者模式.service.impl.Subject;

public class Oberrver {
	public static void main(String[] args) {
//		System.out.println("通知开始");
//
//		IhanFeizi hanFeizi=new Hanfeizi();
//
//		Watch watch=new Watch();
//
//		watch.setIhanFeizi(hanFeizi);
//		watch.start();
//
//
//		System.out.println("通知结束");


		Subject subject=new Subject();
		Progress progress=new Progress();
		subject.addObserver(progress);
		subject.progress();
		subject.setValue(2);

	}
}
